library(tidyverse)
library(fixest)
library(showtext)
library(vtable)
library(writexl)
library(haven)
library(gridExtra)

setwd('D:\\WorkingPaper-Series\\Township_Light\\Replication_Files\\workdata')

##################################
########## Figure C2 #############
##################################


sc_light_gdp <- read_delim('sc_light_gdp.csv')
sc_light_firm <- read_delim('sc_light_firm.csv')
# Panel A
sc_light_gdp %>% 
  ggplot(aes(log_gdp, log_light))+
  geom_point(color = '#77BEF0') +
  geom_smooth(method = 'lm', color = '#B9375D', lwd = 0.8)+
  theme_bw()+
  theme(text = element_text(family = 'serif', size = 9),
        axis.text = element_text(family = 'serif', size = 9)) +
  labs(y = 'Log(Nighttime Light + 1)', x = 'Log(County GDP)') 
# Panel B
sc_light_firm %>% 
  ggplot(aes(log_firm_entry, log_light))+
  geom_point(color = '#77BEF0') +
  geom_smooth(method = 'lm', color = '#B9375D', lwd = 0.8)+
  theme_bw()+
  theme(text = element_text(family = 'serif', size = 9),
        axis.text = element_text(family = 'serif', size = 9)) +
  labs(y = 'Log(Nighttime Light + 1)', x = 'Log(# Firm Entry)')